package com.von.platform.impl.service.rulecfg.entity;

import java.io.Serializable;
import javax.persistence.*;

/**
 * The primary key class for the PDK_RULE_CONFIG database table.
 * 
 */
@Embeddable
public class PdkRuleConfigPK implements Serializable {

    /**
     * 
     */
    private static final long serialVersionUID = -6375766877030755491L;

    private String owner;

	@Column(name="RULE_ID")
	private String ruleId;

	@Column(name="SEQ")
	private long sequence;

    public PdkRuleConfigPK() {
    }
	public String getOwner() {
		return this.owner;
	}
	public void setOwner(String owner) {
		this.owner = owner;
	}
	public String getRuleId() {
		return this.ruleId;
	}
	public void setRuleId(String ruleId) {
		this.ruleId = ruleId;
	}
	public long getSequence() {
		return this.sequence;
	}
	public void setSequence(long sequence) {
		this.sequence = sequence;
	}

	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof PdkRuleConfigPK)) {
			return false;
		}
		PdkRuleConfigPK castOther = (PdkRuleConfigPK)other;
		return 
			this.owner.equals(castOther.owner)
			&& this.ruleId.equals(castOther.ruleId)
			&& (this.sequence == castOther.sequence);

    }
    
	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + this.owner.hashCode();
		hash = hash * prime + this.ruleId.hashCode();
		hash = hash * prime + ((int) (this.sequence ^ (this.sequence >>> 32)));
		
		return hash;
    }
}